package com.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.dao.IDao;
import com.model.Page;

public abstract class BaseService<T> implements IService<T> {

	@Autowired
	private IDao<T> dao;

	@Override
	public int delete(String sql, Map<String, ?> paramMap) {
		return dao.delete(sql, paramMap);
	}

	@Override
	public int update(String sql, Map<String, ?> paramMap) {
		return dao.update(sql, paramMap);
	}

	@Override
	public T get(String sql, Map<String, ?> paramMap) {
		return dao.get(sql, paramMap);
	}

	@Override
	public List<T> getList(String sql, Map<String, ?> paramMap) {
		return dao.getList(sql, paramMap);
	}

	@Override
	public Page<T> getPagable(String sql, Map<String, ?> paramMap, Long pageNo, Long pageSize) {
		return dao.getPagable(sql, paramMap, pageNo, pageSize);
	}

}
